# encoding: utf-8

module Fork
  # 派生别人项目,user=>被派生项目的用户
  def fork_repo(user, project)
    go_project_index(user, project)

    #点击派生
    @driver.find_element(:link, "派生").click

    @driver.find_element(:id, "for_show_dialog").find_element(:tag_name, "a").click
    is_while = true
    while is_while
      if @driver.title.include? "/wait" then
        sleep 1
      else
        is_while = false
      end
    end
  end
end